home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / AppleEvents / Records / AEStruct.h < prev    next >
Text File  |  2000-06-23  |  1KB  |  41 lines

  1. // AEStruct.h
  2.  
  3. #ifndef AEStruct_h
  4. #define AEStruct_h
  5.  
  6. #ifndef AEDescriptor_h
  7. #include "AEDescriptor.h"
  8. #endif
  9. #ifndef AEMember_h
  10. #include "AEMember.h"
  11. #endif
  12. #ifndef AEListItem_h
  13. #include "AEListItem.h"
  14. #endif
  15.  
  16. class AEStruct: public AEDescriptor
  17.   {
  18.     public:
  19.         AEStruct();
  20.         explicit AEStruct( const AEStruct& source )                : AEDescriptor( source )    {}
  21.  
  22.         explicit AEStruct( const AEDescriptor& item )            : AEDescriptor( item, StaticType() )    {}
  23.         explicit AEStruct( const ConstAEListItem& item )        : AEDescriptor( item, StaticType() )    {}
  24.         explicit AEStruct( const ConstAEMember& item )            : AEDescriptor( item, StaticType() )    {}
  25.         explicit AEStruct( const ConstAEParameter& item )        : AEDescriptor( item, StaticType() )    {}
  26.         explicit AEStruct( const ConstAEAttribute& item )        : AEDescriptor( item, StaticType() )    {}
  27.         
  28.         static AEType StaticType()                                        { return AEType( typeAERecord ); }
  29.         bool TypeIsCorrect() const                                        { return Type() == StaticType(); }
  30.         
  31.         uint32 Length() const;
  32.         
  33.         const ConstAEMember operator[]( AEKey i ) const                { return ConstAEMember( *this, i ); }
  34.         AEMember operator[]( AEKey i )                                    { return AEMember( *this, i ); }
  35.         
  36.         const ConstAEListItem MemberByNumber( uint32 i ) const    { return ConstAEListItem( AsList(), i ); }
  37.         AEListItem MemberByNumber( uint32 i )                            { return AEListItem( AsList(), i ); }
  38.   };
  39.  
  40. #endif
  41.